<!--            begin nav kpopzone-->

<?php
$path="C:/xampp/htdocs/00_JO/JOi/controller/";
include_once( $path."SO_recommendation_Controller.php" );
 ?>


	
<div style="margin-left: 0px;" class="bar_240i" >
<form method="post" action="controller/JO_navigation.php" name="f2">
  <div style="" class="JO_h1i">
    Recommendation List 
     
     <span style="position:absolute;top:4px;right:32px;cursor:pointer" onclick="JO_load_iframe('');JO_display2('JO_popup');JO_display2('JO_popupsub');">+</span>
        <span style="position:absolute;top:4px;right:8px;cursor:pointer" onclick="document.f2.submit();">--</span>
    
  </div>
  <div class="content240i">
    <ul class="navi" style="">
      <?php 
		$result_count=SO_12_recommmendation_count();
		$total=$result_count->num_rows;
		$page=1;
		$limit=10;
		$i=1;
		if(($total%$limit)!=0) {$numpages=(int)($total/$limit)+1;}
		else                {$numpages=$total/$limit;}
		if(isset ($_REQUEST["page"])){$page=$_REQUEST["page"];}
		$vt=(($page-1)*$limit)+1;
		$result=SO_12_recommmendation_pagelist($vt,$limit);
		if($result->num_rows)
		while($row=$result->fetch_array())
		{
		 ?>
        <li>
        <div style="width:164px;float:left">
				<a 
					href="?JO_unit=012_recommendation&SO_chude=<?=$row['key']?>&SO_loai=<?=$row['type']?>"
					
				><?=$row['subject']?></a>
             </div>
             <div style="width:24px;float:left;margin:0px">
             
              <a style="background:none;cursor:pointer"  onclick="JO_load_iframe('<?=$row["key"]?>');JO_display2('JO_popup');JO_display2('JO_popupsub');"><img src="JO_images/JO_22_icon_update_on.png" /></a>
           
             </div> 
             <div style="width:5px;float:left;margin:4px">
             <input 
						type	= "hidden" 
						id		= "SO_controller"
						name	= "SO_controller"
						value	= "SO_recommendation_Controller"
				>
             <input type="hidden" name="SO_query" id="SO_query" value="recommendation_updatedel" />
              <input type="checkbox" name="SO_checkdel[]" id="SO_checkdel[]" value="<?=$row['key']?>"/>
              
             </div> 
         </li>
                <?php  }?>
     <li>
     <?

               		 if($numpages>1){
                    if($page>2){
                    ?>
              <a href="#" onclick="sendurl('1');">◀</a>
              <?
                    }
                    if($page>1){
                    ?>
              <a href="#" onclick="sendurl('<?=($page-1)?>');">◁</a>
              <?
                    }
                    if($page-4>1) echo "...";
                    for($i=$page-4;$i<=($page-1);$i++){
                        if($i>0){
                        ?>
              <a href="#" onclick="sendurl('<?=$i?>');">
              <?=$i?>
              </a>
              <?
                        }
                    }
                    echo  "<b style='color=#ffffff;'><u>".$page."</u></b>";
                    for($i=$page+1;$i<=($page+4);$i++){
                        if($i<=$numpages){
                        ?>
              <a href="#" onclick="sendurl('<?=$i?>');">
              <?=$i?>
              </a>
              <?
                        }
                    }
                    if($page+4<$numpages) echo "...";
                    if($page<$numpages){
                    ?>
              <a href="#" onclick="sendurl('<?=($page+1) ?>');">▷</a>
              <?
                    }
                    if($page<($numpages-1)){
                    ?>
              <a href="#" onclick="sendurl('<?=$numpages ?>');">▶</a>
              <?
                    }

                }
                 ?>
     </li>
    </ul>
  </div>
  </form>
 </div>
<!--            end nav kpopzone-->
<script type="text/javascript">
    var musics=new Array();
    var n=0;
	
function JO_load_iframe(id){
	if(id=="")
	var url="JO_012_01_recommendation.php";
	else
	var url="JO_012_01_recommendation.php?SO_chude="+id;
	var obj="JO_popupsub";
	showobj(url,obj)
	
	}
</script>



